package com.xxx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@TableName("menu")
@ApiModel("菜单")
public class Menu {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id，数据库自增")
    private Integer id;
    @ApiModelProperty("菜单名称")
    private String menuName;
    @ApiModelProperty("父菜单ID，没有则为0")
    private Integer parentId;

    @TableField(exist = false)
    @ApiModelProperty("下级菜单列表")
    private List<Menu> treeList;
}
